$(document).ready(function(){
   $('.rep_summaryrep').on('click','#selAccount',function(){
      var target = $(this);
      $('#jobmanagerlistbody').html('');
      $('#jobmanagerlist').show().position({
         my:'left-13 top',
         at:'left bottom+9',
         of:target
      });
     $.ajax({
         type: 'GET',
         url: OC.filePath('jobposition', 'ajax', 'getjobmanagerlist.php'),
         data: {appid: 'reports', uid: target.data('uid')},
         cache: false, 
         beforeSend: function(xhr, settings) {
            if(!showLoading($('#jobmanagerlistbody')))
               return false;
         },
         success: function(result){
            if (!isLoggedIn(result, target)) {
               window.location = redirect_url;
               return;
            }
            $('#jobmanagerlistbody').html(result);
         }
      });
   });
   
   $('#jobmanagerlist').on('click', '.close', function() {
      $('#jobmanagerlist').hide();
   }).on('click', 'td a', function(){
      $(this).closest('table').find('a').removeClass('cur_a');
      $(this).addClass('cur_a');
   });

});